1. Field of the Invention
The present invention relates to a method and apparatus for gradation reproduction of continuous tone images in which the gray scale of a continuous tone image is converted into multiple levels of three or more.
2. Description of the Related Art
There are printers with a type expressing one dot by the existence/nonexistence of ink, i.e., by binary expression. There are also printers which print one dot by selectively using light and dark inks or by changing the dot size, i.e., printers of a type expressing one dot by multivalue expression. Printers of this type can express gradation change more smoothly in comparison with those using binary expression, and also have the advantage of making dots in a highlight portion inconspicuous. To perform printing with a multivalue type printer, multivaluing processing for converting the gray scale of an original image into not two levels but multiple levels (at least three levels) is required.
It is necessary that input image data to be multivalued have a sufficiently large number of gray-scale levels (e.g., 256 levels). Multiple values of multivaluing are a number of values larger than 2, e.g., 3.
When multivaluing is performed, an error diffusion method, which is also useful with respect to two-valuing, may be used. A error diffusion method uses a process in which, when an input image data is mutivalued, an error caused between the state before multivaluing and the state after multivaluing is diffused in subsequent data on the basis of proportions according to weight coefficients. According to the error diffusion method, a grayscale error caused at the time of multivaluing is eliminated by being spread to neighboring pixels, thereby improving the reproducibility of a continuous tone image.
A gradation reproduction apparatus described in Japanese Patent Laid-Open Publication No. 11-17946 (hereinafter referred to as conventional art) is known as an apparatus for carrying out a continuous tone image gradation reproduction method based on a multivaluing-error diffusion method such as that described above.
The conventional art described in the above-mentioned publication includes an example of 3-valuing as multivaluing, which is described as a process in which input image data on each of the pixels expressed by, for example, 256 values (value 0 to value 255) supplied from an unillustrated host computer is converted into a 3-value data (a kind of multivalue data) expressed by, for example, white [0], gray [1], and black [2].
As shown in FIG. 43, the conventional art 21 includes, in a basic arrangement according to a gradation reproduction method based on a 3-valuing error diffusion method, an adder 22 for correcting input image data on a particular pixel (target pixel) by adding a corrected error to form corrected data, a 3-valuing section 23 for three-valuing the corrected data obtained by the adder 22 by using two threshold values, a 3-value memory 24 for storing 3-value data obtained by the 3-valuing section 23, an error detection section 25 for detecting an error between the correction data and the 3-value data with respect to the target pixel, an error spreader 26 for spreading the error detected by the error detection section 25 to unprocessed pixels (neighbor pixels) positioned near the target pixel on the basis of weight coefficients which determine how the error is spread to the neighbor pixels, and an error memory 27 for accumulating errors determined by the error spreader 26 with respect to each pixel, and thereafter transferring the accumulated errors as a corrected error to the adder 22.
The 3-valuing section 23 3-values corrected data by using two threshold values, e.g., a first threshold value of 64 and a second threshold value of 192. The value 64 is an intermediate value between the value 0 and the value 128, and the value 192 is an intermediate value between the value 128 and the value 255.
Under this condition, the 3-valuing section 23 selects white [0] in 3-value data when the corrected data is equal to or smaller than the value 63, selects gray [1] when the corrected data is in the range from the value 63 to the value 192, and selects black [2] in 3-value data when the corrected data is equal to or larger than the value 193.
While the above-mentioned input image data is expressed by, for example, the values 0 to 255 as mentioned above, the above-described corrected data may have a value smaller than 0 and a value exceeding the value 255 since a corrected error is added to the input image data.
Corrected errors transferred from the error memory 27 to the adder 22 appear in a vibrating manner with variations in magnitude. Accordingly, corrected data formed by adding the corrected errors to the input image data also appear in a vibrating manner with the same amplitude as the corrected errors.
A case of 3-valuing of input image data with respect to a test image 29 shown in FIG. 44, using the above-described basic arrangement of the conventional art 21, will next be described.
FIG. 44 is a plan view of a test image 29. The test image 29 has a matrix of 256 dots horizontally by 64 dots vertically, and has continuous gradation from solid black to solid white in the horizontal direction.
FIG. 45 is a diagram showing the distribution of data values of the test image 29 shown in FIG. 44. In FIG. 45, the abscissa represents the position in the horizontal direction on the test image 29 shown in FIG. 44, and the ordinate represents the gray scale of the test image 29 by 256 data values in the range from the value 0 to the value 255, the value 255 representing solid black, the value 0 representing solid white.
The gradation in the test image 29 shown in FIG. 44 is reproduced by 3-valuing using the above-described basic arrangement of the conventional art 21 shown in FIG. 43. Since the two threshold values for 3-valuing are the values 64 and 192, which are fixed threshold values widely spaced apart, vibrating corrected data falls into the range between the two threshold values, and no data item spikes outward beyond the two threshold values.
FIG. 46 is a plan view schematically showing a reproduced image obtained in the above-described manner. The reproduced image shown in FIG. 46 has a gradation reproduction region 31 in which gradations are reproduced by white dots and gray dots from a solid white portion to a certain light gradation, and a gradation reproduction region 32 in which gradations are reproduced by black dots and gray dots from a solid black portion to a certain dark gradation. However, a solid gray region 33 is formed at a halftone gradation at a position between the solid white portion and the solid black portion. The solid gray region 33 is recognized as a contour which does not exist originally. As a result, a gradation discontinuity is caused.
FIG. 47 is a diagram in which the reproduced image shown in FIG. 46 is expressed by a dot distribution. As shown in the dot distribution diagram shown in FIG. 47, a region is formed in which there are no black dots BL and no white dots WH at the halftone gradation, and in which only gray dots GR exist.
To eliminate such a gradation discontinuity caused at an intermediate gradation in solid gray region 33, an in-window pixel checking section 28 is added to the basic arrangement in the conventional art 21, as shown in FIG. 43.
The in-window pixel checking section 28 checks whether all the items of 3-value data on a plurality of pixels existing in a predetermined window (indicated by hatching in symbol 28 in FIG. 43) in the 3-value data memory 24 are gray [1].
If there is white [0] or black [2] in the 3-value data on the pixels in the predetermined window, the 3-valuing section 23 performs ordinary 3-valuing processes described above, that is, 3-valuing using the threshold value 64 and the threshold value 192.
On the other hand, if all the items of 3-value data on the pixels in the predetermined window are gray [1], the 3-valuing section 23 performs special 3-valuing processing, that is, it changes the two threshold values so that the interval therebetween is reduced. More specifically, it substitutes the value 120 for the threshold value 64, and substitutes the value 136 for the threshold value 192.
Under this condition, the 3-valuing section 23 selects white [0] in 3-value data when the corrected data is equal to or smaller than the value 119, selects gray [1] when the corrected data is in the range from the value 120 to the value 136, and selects black [2] in 3-value data when the corrected data is equal to or larger than the value 137.
If the interval between the threshold values is reduced as described above, the probability of occurrence of gray [1] as a result of 3-valuing is reduced and occurrences of white [0] and black [2] are increased, so that the vibrating corrected data spikes outward beyond the two threshold values with respect to the halftone gradation. Consequently, the corresponding 3-valuing results consist of not only gray [1] but also white [0] and black [2], and, at the time of printing (image reproduction), gray dots, white dots and black dots are suitably mixed and no solid gray such as that described above (see symbol 33 in FIG. 27) occurs, thus achieving continuous gradation even at the halftone gradation.
As described above, in the conventional art 21 (see FIG. 43), the interval between the two threshold values is reduced if it is determined that all the items of 3-value data on a plurality of pixels in the predetermined window in the 3-value data memory 24 are gray [1].
The above-described conventional art 21, however, has the problems described below.    (1) There is no criterion for determining how the actual reduction takes place in the interval between the two threshold values for setting a suitable mixture of gray dots, black dots and white dots at the halftone gradation.
If the interval between the two threshold values is excessively reduced, the proportion of black dots and white dots at the halftone gradation becomes excessively high and the proportion of gray dots becomes insufficient. On the other hand, if the reduction in the interval between the two threshold values is inadequate, solid gray at the halftone gradation is not eliminated.
Thus, the conventional art 21 lacks a criterion for determination of suitable threshold values and, therefore, is unsatisfactory in terms of practical use.    (2) Because of the need for reading out 3-value data on a plurality of pixels in the predetermined window in the 3-value memory, and for checking whether all the items of 3-value data are 1 (gray), the necessary algorithm is complicated.